Cross-compilation fixes. (#392646, Yevgen Muntyan)
authorMatthias Clasen <mclasen@redhat.com>
Thu, 4 Jan 2007 15:05:07 +0000 (15:05 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 4 Jan 2007 15:05:07 +0000 (15:05 +0000)
2007-01-04  Matthias Clasen  <mclasen@redhat.com>

        * gtk/Makefile.am:
        * gdk-pixbuf/Makefile.am:
        * configure.in:
        * gdk/win32/rc/gdk.rc.in: Cross-compilation fixes.
        (#392646, Yevgen Muntyan)

svn path=/trunk/; revision=17065

configure.in
gdk/win32/rc/gdk.rc.in
gtk/Makefile.am
gtk/gtkiconview.c

index 2d798d1998cc07fb6c4bd3c61e85818bbf104b57..06bbaf1ddf7dcebbaaa05bf969063b1bfb6dfd50 100644 (file)
@@ -1009,7 +1009,8 @@ AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
 
 if test $cross_compiling = yes; then
   AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
-  if test x$GDK_PIXBUF_CSOURCE = xno; then
+  AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
+  if test x$GTK_UPDATE_ICON_CACHE = xno; then
     REBUILD_PNGS=#
   fi
 fi
@@ -1019,7 +1020,7 @@ if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
      AC_MSG_ERROR([
 *** gtkbuiltincache.h is not in the tree, and cannot be built
 *** because you don't have libpng, or (when cross-compiling) you 
-*** don't have a prebuilt gdk-pixbuf-csource on the host system.])
+*** don't have a prebuilt gtk-update-icon-cache on the build system.])
 fi
 
 AC_SUBST(REBUILD_PNGS)
index 8f41373792d101d82a339832212c563b27edff7f..a1a00fdef72e59ed79b5f9f7e16cdc1955102689 100644 (file)
@@ -1,6 +1,6 @@
 #include <winver.h>
 
-GTK_ICON               ICON                    "gtk.ico"
+GTK_ICON               ICON                    "@srcdir@/gtk.ico"
 
 VS_VERSION_INFO VERSIONINFO
   FILEVERSION @GTK_MAJOR_VERSION@,@GTK_MINOR_VERSION@,@GTK_MICRO_VERSION@,0
index 36ad0292cbd22ff5c7eb88cf4423044a8fca163a..7e5c5c3522458e65ea2349e86246804404a5485a 100644 (file)
@@ -1116,11 +1116,19 @@ stamp-icons: $(STOCK_ICONS)
        done                                                                    \
        && touch stamp-icons
 
+if CROSS_COMPILING
+gtk_update_icon_cache_program = $(GTK_UPDATE_ICON_CACHE)
+else
+gtk_update_icon_cache_program =                                                        \
+       GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders    \
+          ./gtk-update-icon-cache
+endif
+
 gtkbuiltincache.h: @REBUILD@ stamp-icons
        $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT)
-       GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders    \
-          ./gtk-update-icon-cache --force --ignore-theme-index                 \
-          --source builtin_icons stock-icons > gtkbuiltincache.h
+       $(gtk_update_icon_cache_program) --force --ignore-theme-index           \
+          --source builtin_icons stock-icons > gtkbuiltincache.h.tmp &&        \
+       mv gtkbuiltincache.h.tmp gtkbuiltincache.h
 
 EXTRA_DIST +=                   \
        $(STOCK_ICONS)          \
index f7ecd435f82a0d599d8a441a4bcc588a1c612cf2..242e98ca9a68f6e3b03dd59e8dcc5cdf03b43eda 100644 (file)
@@ -440,6 +440,8 @@ static gboolean gtk_icon_view_maybe_begin_drag   (GtkIconView             *icon_
                                                  GdkEventMotion          *event);
 
 static void     remove_scroll_timeout            (GtkIconView *icon_view);
+static void     clear_dest_info                  (GtkIconView *icon_view);
+static void     clear_source_info                (GtkIconView *icon_view);
 
 
 static guint icon_view_signals[LAST_SIGNAL] = { 0 };
@@ -970,6 +972,9 @@ gtk_icon_view_destroy (GtkObject *object)
       icon_view->priv->vadjustment = NULL;
     }
   
+  clear_dest_info (icon_view);
+  clear_source_info (icon_view);
+
   (* GTK_OBJECT_CLASS (gtk_icon_view_parent_class)->destroy) (object);
 }